/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.taglib;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class ParseEnterToBr extends TagSupport {
	private static final long serialVersionUID = 1L;
	private String source;

	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public int doStartTag() throws JspException {
		try {
			JspWriter e = this.pageContext.getOut();
			String str = this.source;
			if (str != null && !str.equals("")) {
				str = str.replace(">", "&gt;");
				str = str.replace("<", "&lt;");
				str = str.replace("\n", "<br>");
			} else {
				str = "";
			}

			e.print(str);
			return 0;
		} catch (Exception arg2) {
			throw new JspException(arg2.toString());
		}
	}

	public int doEndTag() {
		return 6;
	}
}